<template>
  <div>
    <ZgEdit
      ref="dialog"
      :columns="columns"
      :formulas="formulas"
      :view="view"
      validUrl=""
      saveUrl="">
    </ZgEdit>
  </div>
</template>
<script>
const synchronous = [
  { value: '1', label: '追加新的单据权限' },
  { value: '2', label: '组织2' },
  { value: '3', label: '组织3' }
]
export default {

  data () {
    return {
      view: { width: '60%', top: '5%', title: '同步前置流程单据权限' },

      columns: [
        { name: '当前流程', code: 'segmentName', compType: '单行文本', isNeed: false, offset: 0, span: 24, defaultVal: '测试流程（铁路）【WFA_RY_JM_0521】' },
        { name: '当前环节', code: 'code', compType: '单行文本', isNeed: false, offset: 0, span: 24, defaultVal: '数量单制单【00】' },
        { name: '同步策略', code: 'sync', compType: '单行文本', isNeed: false, offset: 0, span: 24, defaultVal: '1', extra: { 下拉选项: synchronous } },
        { name: '目标环节', code: 'targetStage', compType: '多选', isNeed: false, offset: 0, span: 24, defaultVal: [], extra: { 字典类型: 'political' } }

      ],
      formulas: [
        { triggerMode: '初始化时', name: '公式1', content: 'console.log("init");' },
        { triggerMode: '数据变化时', name: '公式2', content: 'console.log("update");' },
        { triggerMode: '提交时', name: '公式3', content: 'console.log("submit");' }
      ]
    }
  },
  methods: {
    open () {
      this.$refs.dialog.open()
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
